<?php
# PHPlot Example: Point plot - scatter plot
require_once 'phplot.php';

$data = array(
array(3,3.5,3.5)
);

$plot = new PHPlot(400, 400);
$plot->SetImageBorderType('plain');

$plot->SetPlotType('points');
$plot->SetDataType('data-data');
$plot->SetDataValues($data);

# Main plot title:
$plot->SetTitle('Detailed Plot');
$plot->SetPlotAreaBgImage('bg_plot.png','scale');

# Need to set area and ticks to get reasonable choices.
$plot->SetPlotAreaWorld(1, 1, 6, 6);
$plot->SetXTickIncrement(1);
$plot->SetYTickIncrement(1);

# Move axes and ticks to 0,0, but turn off tick labels:
$plot->SetXAxisPosition(0); # Is default
$plot->SetYAxisPosition(0);
$plot->SetXTickPos('xaxis');
$plot->SetXTickLabelPos('xaxis');
$plot->SetYTickPos('yaxis');
$plot->SetYTickLabelPos('yaxis');

# Turn on 4 sided borders, now that axes are inside:
$plot->SetPlotBorderType('full');
$plot->SetDataBorderColors('white');
$plot->SetDataColors('DarkGreen');
$plot->SetPointSizes('15');

# Draw both grids:
$plot->SetDrawXGrid(True);
$plot->SetDrawYGrid(True);  # Is default

$plot->DrawGraph();

?>